/*
** my_put_nbr.c for Jour_03 in /home/noret_a//piscine/jour3
**
** Made by christophe noret
** Login   <noret_a@epitech.net>
**
** Started on  Wed Oct  3 16:01:34 2012 christophe noret
** Last update Thu Oct  4 23:36:37 2012 christophe noret
*/

void	my_put_nbr(int nb)
{
  int	i;

  if (nb < 0)
    my_putchar('-');
  else if (nb == 0)
    my_putchar(nb);
  else
    nb = nb * -1;
  i = -1;
  while (nb / -i < -9)
    i = i * 10;
  while (nb <= 0 && i < 0)
    {
      my_putchar(nb / i + '0');
      nb = nb % i;
      i = i / 10;
    }
}
